<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">

        <input type="text" v-model="num">
        <button v-on:click="num++">点赞</button>
        <button v-on:click="cancel">取消</button>
        <h1>{{name}} , vue 您好。有{{num}}人都说vue功能强悍，给你点赞！</h1>
    </div>

    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        //1.vue声明式渲染
        let vm = new Vue({
            el: "#app",
            data: {
                name: "木丁西",
                num: 1
            },
            methods:{
                cancel(){
                    this.num--;
                }
            }
        });

        /*
        1.创建vue实例，关联页面的模板，将自己的数据（data）渲染到关联的模板，响应式的
        2.指令简化对dom的操作
        */
        
      
    </script>
</body>
</html>